/**
 * @Description 
 * @Version 
 * @Author Dong
 * @Date 2021-03-08 15:27:32
 * @LastEditors Dong
 * @LastEditTime 2021-03-09 09:22:46
 * @FilePath \fed-e-task-04-06\code\work\src\app\store\actions\todo.actions.ts
 */
// src\app\store\actions\todo.actions.ts
import { createAction, props } from '@ngrx/store';
import { Todo } from '../reducers/todo.reducer';

// 添加单个 todo 
export const addTodo = createAction('addTodo', props<{ value: string}>());

// 删除单个 todo
export const deleteTodo = createAction('deleteTodo', props<{ id: string}>());

// 修改单个 todo
export const changeTodo = createAction('changeTodo', props<{ id: string, value: string, checked: boolean }>());

// 初始化 todo
export const initTodos = createAction('initTodos', props<{ todos: Todo[]}>());